#include <stdio.h>
#include <stdlib.h>

#define NMAX 7000


void
Bubble_sort(int* a, int n)
{
	register int i, j, tmp;
	char F = false;

	for (i = 0; i < n; ++i) {
		for (j = 1; j < n - i; ++j) {
			if (a[j] < a[j-1]) {
				tmp = a[j];
				a[j] = a[j-1];
				a[j-1] = tmp;
				F = true;
			}
		}
		if (!F)
			break;
		F = false;
	}
}



int
main(void)
{
	int array[NMAX], n, i=0;

	freopen("bubble.in", "rt", stdin);
	freopen("bubble.out", "w", stdout);

	scanf("%d\n", &n);
	while(i<n)
		(void)scanf("%d", &array[i++]);

	Bubble_sort(&array[0], n);

	i = 0;
	while (i<n)
		(void)printf("%d ", array[i++]);
	putchar('\n');
	return 0;
}
